﻿using Autofac;
using Core;
using HandyControl.Controls;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.Configuration;
using System.Data;
using System.Windows;

namespace HandyWpf
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        [STAThread]
        static void Main(string[] args)
        {
            using IHost host = Program.CreateHost(args);
            var app = new App();
            var context = host.Services.GetService<IComponentContext>();
            app.MainWindow = context?.Resolve<MainWindow>();
            app.MainWindow!.Visibility = Visibility.Visible;
            app.InitializeComponent();
            app.Run();
            host.Start();
        }
    }

}
